package cn.baage.campus.model.dto;

import lombok.Data;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @Description: 点赞
 * @Author: 八阿哥
 * @url: baage.cn
 * @Version: 1.0
 **/
@Data
@Document("likeInfo")
@CompoundIndexes({
        @CompoundIndex(name = "unique_like_index", def = "{'userId': 1, 'type': 1, 'targetId': 1}", unique = true)
})
public class LikeInfo {

    /** 用户ID **/
    private String userId;

    /** 类型 **/
    private Integer type;

    /** 目标ID **/
    private String targetId;


}
